$(function () {
   findById();
});

function findById() {
    let id = sessionStorage.getItem("clockId");
    let result = myAjax("/api/rb/user/findById", {id: id}, "get");
    if (result != null) {
        setData(result.data);
    }
}

function setData(data) {
    $("#nickName").val(data.nickName);
}

/**
 * 冻结账户
 */
function save() {
    let data={
        id:sessionStorage.getItem("clockId"),
        clockTime:$("#clockTime").val()
    };
    let result = myAjax("/api/se/user/clockUser", data, "post");
    if(result.code === 200){
        layer.alert(result.data,{icon:1});
        x_admin_close();
        x_admin_father_reload();
    }else{
        layer.alert(result.data,{icon:2});
    }
}
